#!/bin/bash
# date: Mon Aug  1 10:57:28 CST 2022
# author: xxr
read -p "输入数字 " num
newNum=`echo $num | grep -o "[^0-9]"`
if [[ -n $newNum ]];then
	echo "重新输入数字 "
else
	if [ $num  -eq 1 ];then
		echo -e "\e[32mhello\e[0m"
	elif [ $num -eq 2 ];then
       		echo -e "\e[32mworld\e[0m"	
	else
		echo -e "\e[32mhello world\e[0m"
	fi
fi
